Allocation

inner class Allocation(var sharesAllocated: Long, var sharesAllocatedAdjusted: Long, var costBasisAllocated: Long, var allocatedPosition: CostCalculation.Position)

Class that references a transaction and number of shares allocated from that transaction. QUANTITY BASIS DIFFERS BY ALLOCATION MODEL - consumers must pick the one they need. The table below is AS SEEN ON A SELL'S buyAllocations; a buy's sellAllocations are the reverse: average cost : sharesAllocated = sale-date, sharesAllocatedAdjusted = buy-date lot controlled: sharesAllocated = buy-date, sharesAllocatedAdjusted = sale-date and both are reversed again between a sell's buyAllocations and a buy's sellAllocations, because allocateLots() and allocateAverageCostSales() each add the pair with the arguments swapped. Refer calculateGainsForPos, the only reader that sees both models.

Constructors

Link copied to clipboard
constructor(sharesAllocated: Long, sharesAllocatedAdjusted: Long, costBasisAllocated: Long, allocatedPosition: CostCalculation.Position)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun toString(): String